package com.monkeyboy.mongo_demo;


import com.mongodb.client.MongoCollection;
import com.mongodb.client.MongoDatabase;
import com.monkeyboy.util.MongoDBAuthUtil;
import org.bson.Document;

/**
 * @Author Gavin
 * @date 2021.01.10 16:48
 */
public class MongoDBDemo {
    public static void main(String[] args) {
        //获取mongodb数据库
        MongoDatabase database= MongoDBAuthUtil.getDatabase("test");
        MongoCollection<Document> coll = database.getCollection("java_coll");

    }
}
